<html>

    <head>
         <script type="text/javascript">
         	// adapted from http://jibbering.com/2002/4/httprequest.html
function getXmlHttp(){
  var xmlhttp;
  try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
    try {
      xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (E) {
      xmlhttp = false;
    }
  }
  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
    xmlhttp = new XMLHttpRequest();
  }
  return xmlhttp;
}

function getUrl(url, cb) {
  var xmlhttp = getXmlHttp();
  xmlhttp.open("GET", url);
  xmlhttp.onreadystatechange = function() {
    if (xmlhttp.readyState == 4) {
      cb(xmlhttp.status, 
         xmlhttp.getAllResponseHeaders(), 
         xmlhttp.responseText);
      }
  }
  xmlhttp.send(null);
}   
                var AJAX_URL="http://www.fettig.net/playground/ajax-subdomain/ajaxdata.php";
               function gotResult(status, headers, result) {
                      var oldDomain = document.domain;
                      document.domain = "fettig.net";
                      window.parent.gotTime(result);
                      document.domain = oldDomain;                      
                      setTimeout(getTime, 1000);
                }
                function getTime(){   
                	alert('call');  
                     getUrl(AJAX_URL, gotResult);
                }
                getTime();
                </script>
          </head>
    </html>
